﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CUiExportPaintFilesErrorForm
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Tecnomatix.Engineering.Ui;


namespace DnProcessSimulateCommands;

public class CUiExportPaintFilesErrorForm : TxForm
{
  private Button m_closeButton;
  private Label m_errorsTitle;
  private PictureBox pictureBox1;
  private IContainer components;
  private RichTextBox m_detailsTextBox;

  public CUiExportPaintFilesErrorForm() => this.InitializeComponent();

  private void InitializeComponent()
  {
    ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (CUiExportPaintFilesErrorForm));
    this.pictureBox1 = new PictureBox();
    this.m_closeButton = new Button();
    this.m_errorsTitle = new Label();
    this.m_detailsTextBox = new RichTextBox();
    ((ISupportInitialize) this.pictureBox1).BeginInit();
    ((Control) this).SuspendLayout();
    this.pictureBox1.Image = (Image) componentResourceManager.GetObject("pictureBox1.Image");
    this.pictureBox1.Location = new Point(12, 12);
    this.pictureBox1.Name = "pictureBox1";
    this.pictureBox1.Size = new Size(34, 35);
    this.pictureBox1.TabIndex = 0;
    this.pictureBox1.TabStop = false;
    this.m_closeButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
    this.m_closeButton.DialogResult = DialogResult.Abort;
    this.m_closeButton.Location = new Point(205, 204);
    this.m_closeButton.Name = "m_closeButton";
    this.m_closeButton.Size = new Size(75, 23);
    this.m_closeButton.TabIndex = 2;
    this.m_closeButton.Text = "Close";
    this.m_closeButton.UseVisualStyleBackColor = true;
    this.m_errorsTitle.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
    this.m_errorsTitle.Location = new Point(52, 12);
    this.m_errorsTitle.Name = "m_errorsTitle";
    this.m_errorsTitle.Size = new Size(228, 35);
    this.m_errorsTitle.TabIndex = 6;
    this.m_errorsTitle.Text = "Text";
    this.m_detailsTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
    this.m_detailsTextBox.Location = new Point(12, 53);
    this.m_detailsTextBox.Name = "m_detailsTextBox";
    this.m_detailsTextBox.ReadOnly = true;
    this.m_detailsTextBox.ScrollBars = RichTextBoxScrollBars.Vertical;
    this.m_detailsTextBox.Size = new Size(268, 145);
    this.m_detailsTextBox.TabIndex = 7;
    this.m_detailsTextBox.Text = "";
    ((Form) this).AcceptButton = (IButtonControl) this.m_closeButton;
    ((Form) this).ClientSize = new Size(292, 239);
    ((Control) this).Controls.Add((Control) this.m_detailsTextBox);
    ((Control) this).Controls.Add((Control) this.m_errorsTitle);
    ((Control) this).Controls.Add((Control) this.m_closeButton);
    ((Control) this).Controls.Add((Control) this.pictureBox1);
    ((Control) this).MinimumSize = new Size(300, 266);
    ((Control) this).Name = nameof (CUiExportPaintFilesErrorForm);
    ((Form) this).ShowIcon = false;
    ((Control) this).Text = "Export Files for Paint Simulation";
    ((ISupportInitialize) this.pictureBox1).EndInit();
    ((Control) this).ResumeLayout(false);
  }

  public string ErrorsTitle
  {
    set => this.m_errorsTitle.Text = value;
  }

  public string DetailsText
  {
    set => this.m_detailsTextBox.Text = value;
  }

  public void AddErrors(ArrayList errors)
  {
    for (int index = 0; index < errors.Count; ++index)
    {
      string error = errors[index] as string;
      RichTextBox detailsTextBox = this.m_detailsTextBox;
      detailsTextBox.Text = $"{detailsTextBox.Text}{error}\n";
    }
  }

  public void AddErrorText(string text) => this.m_detailsTextBox.Text += text;
}
